{% extends "zinnia/base.html" %}
{% load i18n tagging_tags comments zinnia_tags disqus_tags %}
{% block meta %}
{{block.super}}
<meta name="DC.rights" scheme="DCTERMS.URI" content="http://creativecommons.org/licenses/by/3.0/" />
<meta name="DC.rights" content="(c) {{object.creation_date|date:'Y'}} Jay Tu The Hien" />
{% endblock %}
{% block title %}{{ object.title }}{% endblock %}

{% block meta-description %}{% if object.excerpt %}{{ object.excerpt|striptags }}{% else %}{{ object.content|striptags|truncatewords:100 }}{% endif %}{% endblock %}

{% block link %}
  {{ block.super }}
  {% with object.previous_entry as previous_entry %}{% if previous_entry %}
  <link rel="prev" title="{{ previous_entry.title }}" href="{{ previous_entry.get_absolute_url }}" />
  {% endif %}{% endwith %}
  {% with object.next_entry as next_entry %}{% if next_entry %}
  <link rel="next" title="{{ next_entry.title }}" href="{{ next_entry.get_absolute_url }}" />
  {% endif %}{% endwith %}
  {% if object.short_url %}
  <link rel="shortlink" href="{{ object.short_url }}" />
  {% endif %}
  <link rel="canonical" href="{{ object.get_absolute_url }}" />
{% endblock %}

{% block content %}
<div id="entry-{{ object.pk }}" class="hentry{% if object.featured %} featured{% endif %}">
  {% with object.html_content|safe as object_content %}
  {% include "zinnia/_entry_detail.html" %}
  {% endwith %}
</div>

<div id="comments">
  {% if object.comments_are_open %}
  	{% disqus_embed object.title object.id object.get_absolute_url %}
  {% else %}
  <p>{% trans "Comments are closed." %}</p>
  {% endif %}
</div>
{% endblock %}

{% block admin_tools %}
{% if perms.zinnia.change_entry %}
<li>
  <a href="{% url admin:zinnia_entry_change object.pk %}" title="{% trans "Edit the entry" %}">
    {% trans "Edit the entry" %}
  </a>
</li>
{% endif %}
{% endblock %}
